//
//  UIImage+Scale.m
//  Gainko
//
//  Created by jinfeng gu on 12-9-6.
//  Copyright (c) 2012年 RanCheng.gu. All rights reserved.
//

#import "UIImage+Scale.h"

@implementation UIImage (Scale)
-(UIImage*)imageScaleToSize:(CGSize)newSize{
    
    UIGraphicsBeginImageContext(newSize);
    
    // Tell the old image to draw in this new context, with the desired
    // new size
    [self drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    
    // Get the new image from the context
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
    
    // End the context
    UIGraphicsEndImageContext();
    
    // Return the new image.
    return newImage;
}


+ (UIImage *)roleFaceWithRoleName:(NSString*)name
{
    UIImage *image;
 
    return image;
}
@end
